package cn.geracomium.util.web;

import java.io.Serializable;
import java.util.List;

/**
 * Created by {wang jian} on 18/6/26.
 */
public class Page<T> implements Serializable {

    private List<T> list;               // 结果数
    private int pageNum;                // 当前页
    private int pageSize;                // 显示条数
    private long totalCount;                // 总行数

    public Page(List<T> list, int pageNum, int pageSize, long totalCount) {
        this.list = list;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.totalCount = totalCount;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    @Override
    public String toString() {
        return "Page{" +
                "list=" + list +
                ", pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", totalCount=" + totalCount +
                '}';
    }
}
